<template>
  <div class="v-c-page">
      <div v-if="showList == 0" class="v-c-nav">
          <div class="d-flex d-flex-between d-flex-middle px20 mb15 mt20">
              <div class="d-flex d-flex-milddle pr10">
                  <div class="mr10">
                      <a-input placeholder="请输入角色名称" allowClear />
                  </div>
                  <a-button type="primary" class="radius6" @click="ajaxQuery">查询</a-button>
              </div>
              <a-button type="primary" class="radius6" @click="roleModal">新增</a-button>
          </div>
          <div class="table-wrapper">
              <a-table rowKey="id" :columns="colums" :pagination="false" :scroll="{ x: '1000px'}" tableLayout="auto" :loading="tableLoading" :data-source="tableData">
                  <template v-slot:bodyCell="{column,record,index}">
                    <template v-if="column.dataIndex === 'userlist'">
                      <button class="ant-btn ant-btn-primary is-plain sm" @click="userFind"><span>查看</span></button>
                    </template>
                    <template v-if="column.dataIndex === 'operate'">
                      <button class="ant-btn ant-btn-success is-plain sm mr10" @click="aclFind"><span>功能权限</span></button>
                      <button class="ant-btn ant-btn-primary is-plain sm mr10"><span>编辑</span></button>
                      <a-popconfirm
                        title="确定删除该用户？"
                        ok-text="删除"
                        cancel-text="取消"
                        @confirm="deleteAct"
                      >
                        <button class="ant-btn ant-btn-danger is-plain sm"><span>删除</span></button>
                      </a-popconfirm>
                    </template>
                  </template>
              </a-table>
              <div class="d-flex d-flex-end mt30 mr30 mb30">
                  <a-pagination
                    size="default"
                    v-model:current="queryForm.pageNo"
                    v-model:pageSize="queryForm.pageSize"
                    @change="ajaxQuery"
                    :total="total"
                    :show-total="() => `共 ${total} 条`"
                  />
              </div>
          </div>
      </div>
      <div class="pt30" v-else>
        <div class="d-flex d-flex-middle d-flex-between pl30 pr30 mb30">
          <div class="d-flex d-flex-middle color-000 cursor" @click="editeBack">
            <svg class="icon" style="width: 1.3em;height: 1.3em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1718"><path d="M631.04 161.941333a42.666667 42.666667 0 0 1 63.061333 57.386667l-2.474666 2.730667-289.962667 292.245333 289.706667 287.402667a42.666667 42.666667 0 0 1 2.730666 57.6l-2.474666 2.752a42.666667 42.666667 0 0 1-57.6 2.709333l-2.752-2.474667-320-317.44a42.666667 42.666667 0 0 1-2.709334-57.6l2.474667-2.752 320-322.56z" fill="#111111" p-id="1719"></path></svg>
            <span>返回</span>
          </div>
          <a-button type="primary" class="radius6">保存</a-button>
        </div>
        <div class="table-wrapper" v-if="showList == 1">
          <a-table rowKey="id" :columns="userColums" :pagination="false" :scroll="{ x: '1000px'}" tableLayout="auto" :loading="tableLoading" :data-source="userTableData">
            <template v-slot:bodyCell="{column,record,index}">
              <template v-if="column.dataIndex === 'disabledFlag'">
                <em :class="record.disabledFlag?'color-green':'color-warn'">{{record.disabledFlag?'启用':'禁用'}}</em>
              </template>
              <template v-if="column.dataIndex === 'operate'">
                <button class="ant-btn ant-btn-danger is-plain sm"><span>删除</span></button>
              </template>
            </template>
          </a-table>
        </div>
        <div class="pb30 pl30" v-if="showList == 2">
          <!-- <div class="color-333 font12">设置角色对应的功能操作、后台管理权限</div> -->
          <a-checkbox-group v-model:value="checkedData" style="width:100%;padding-right:100px">
              <div class="checked-box" style="width:100%">
                <ul>
                    <RoleTreeMenu :tree="tree" :index="0" />
                </ul>
              </div>
          </a-checkbox-group>      
        </div>
      </div>
      <a-modal width="320px" centered v-model:open="modalVisible" :maskClosable="false" class="c-modal">
        <template #title>
          <div class="hd">添加角色</div>
        </template>
        <template #footer>
          <div class="d-flex d-flex-center">
            <a-button :loading="btnStatus" class="d-flex-item" type="primary" size="large" @click="save">{{ btnStatus?'正在保存...':'保存' }}</a-button>
          </div>
        </template>
        <div class="d-flex d-flex-middle mb10">
          <span class="lbl">角色名称</span>
          <a-input placeholder="请输入角色名称" />
        </div>
        <div class="d-flex d-flex-middle mb10">
          <span class="lbl">角色编码</span>
          <a-input placeholder="请输入角色编码" />
        </div>
        <div class="d-flex d-flex-middle mb10">
          <span class="lbl">角色备注</span>
          <a-input placeholder="请输入角色备注" />
        </div>
      </a-modal>
  </div>
</template>
<script setup lang="ts">
import { reactive,ref,onMounted,computed } from 'vue';
import RoleTreeMenu from './components/role-tree-menu.vue';
import dayjs from 'dayjs';
let showList= ref(0)
let modalVisible = ref(false)
let btnStatus = ref(false)
let checkedData = ref();
let tree = ref(
  [
    {
        "menuId": 138,
        "menuName": "OA系统",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 145,
                "menuName": "企业详情",
                "contextMenuId": null,
                "parentId": 138,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 196,
                        "menuName": "查看详情",
                        "contextMenuId": null,
                        "parentId": 145,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 144,
                "menuName": "企业信息",
                "contextMenuId": null,
                "parentId": 138,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 181,
                        "menuName": "查询",
                        "contextMenuId": 144,
                        "parentId": 144,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 182,
                        "menuName": "新建",
                        "contextMenuId": 144,
                        "parentId": 144,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 183,
                        "menuName": "编辑",
                        "contextMenuId": 144,
                        "parentId": 144,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 184,
                        "menuName": "删除",
                        "contextMenuId": 144,
                        "parentId": 144,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 132,
                "menuName": "通知公告",
                "contextMenuId": null,
                "parentId": 138,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 142,
                        "menuName": "公告详情",
                        "contextMenuId": null,
                        "parentId": 132,
                        "menuType": 2,
                        "children": []
                    },
                    {
                        "menuId": 149,
                        "menuName": "我的通知",
                        "contextMenuId": null,
                        "parentId": 132,
                        "menuType": 2,
                        "children": []
                    },
                    {
                        "menuId": 150,
                        "menuName": "我的通知公告详情",
                        "contextMenuId": null,
                        "parentId": 132,
                        "menuType": 2,
                        "children": []
                    },
                    {
                        "menuId": 185,
                        "menuName": "查询",
                        "contextMenuId": 132,
                        "parentId": 132,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 186,
                        "menuName": "新建",
                        "contextMenuId": 132,
                        "parentId": 132,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 187,
                        "menuName": "编辑",
                        "contextMenuId": 132,
                        "parentId": 132,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 188,
                        "menuName": "删除",
                        "contextMenuId": 132,
                        "parentId": 132,
                        "menuType": 3,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuId": 137,
        "menuName": "进销存系统",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 48,
                "menuName": "商品管理",
                "contextMenuId": null,
                "parentId": 137,
                "menuType": 1,
                "children": [
                    {
                        "menuId": 47,
                        "menuName": "商品管理",
                        "contextMenuId": null,
                        "parentId": 48,
                        "menuType": 2,
                        "children": [
                            {
                                "menuId": 165,
                                "menuName": "查询",
                                "contextMenuId": 47,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 166,
                                "menuName": "新建",
                                "contextMenuId": 47,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 167,
                                "menuName": "批量删除",
                                "contextMenuId": 47,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 194,
                                "menuName": "删除",
                                "contextMenuId": 47,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 195,
                                "menuName": "修改",
                                "contextMenuId": null,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 216,
                                "menuName": "导出",
                                "contextMenuId": null,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 217,
                                "menuName": "导入",
                                "contextMenuId": null,
                                "parentId": 47,
                                "menuType": 3,
                                "children": []
                            }
                        ]
                    },
                    {
                        "menuId": 78,
                        "menuName": "商品分类",
                        "contextMenuId": null,
                        "parentId": 48,
                        "menuType": 2,
                        "children": [
                            {
                                "menuId": 173,
                                "menuName": "新建",
                                "contextMenuId": 78,
                                "parentId": 78,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 174,
                                "menuName": "查询",
                                "contextMenuId": 78,
                                "parentId": 78,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 175,
                                "menuName": "编辑",
                                "contextMenuId": 78,
                                "parentId": 78,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 176,
                                "menuName": "删除",
                                "contextMenuId": 78,
                                "parentId": 78,
                                "menuType": 3,
                                "children": []
                            }
                        ]
                    },
                    {
                        "menuId": 79,
                        "menuName": "自定义分组",
                        "contextMenuId": null,
                        "parentId": 48,
                        "menuType": 2,
                        "children": [
                            {
                                "menuId": 177,
                                "menuName": "新建",
                                "contextMenuId": 78,
                                "parentId": 79,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 178,
                                "menuName": "查询",
                                "contextMenuId": 78,
                                "parentId": 79,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 179,
                                "menuName": "编辑",
                                "contextMenuId": 78,
                                "parentId": 79,
                                "menuType": 3,
                                "children": []
                            },
                            {
                                "menuId": 180,
                                "menuName": "删除",
                                "contextMenuId": 78,
                                "parentId": 79,
                                "menuType": 3,
                                "children": []
                            }
                        ]
                    }
                ]
            }
        ]
    },
    {
        "menuId": 45,
        "menuName": "部门员工",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 46,
                "menuName": "部门员工",
                "contextMenuId": null,
                "parentId": 45,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 91,
                        "menuName": "添加员工",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 92,
                        "menuName": "编辑员工",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 93,
                        "menuName": "禁用启用员工",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 94,
                        "menuName": "调整员工部门",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 95,
                        "menuName": "重置密码",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 96,
                        "menuName": "删除员工",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 86,
                        "menuName": "添加部门",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 87,
                        "menuName": "修改部门",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 88,
                        "menuName": "删除部门",
                        "contextMenuId": null,
                        "parentId": 46,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 76,
                "menuName": "角色管理",
                "contextMenuId": null,
                "parentId": 45,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 97,
                        "menuName": "添加角色",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 98,
                        "menuName": "删除角色",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 99,
                        "menuName": "编辑角色",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 100,
                        "menuName": "更新数据范围",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 101,
                        "menuName": "批量移除员工",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 102,
                        "menuName": "移除员工",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 103,
                        "menuName": "添加员工",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 104,
                        "menuName": "修改权限",
                        "contextMenuId": null,
                        "parentId": 76,
                        "menuType": 3,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuId": 218,
        "menuName": "文档中心",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 147,
                "menuName": "帮助文档",
                "contextMenuId": null,
                "parentId": 218,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 170,
                        "menuName": "新建目录",
                        "contextMenuId": 147,
                        "parentId": 147,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 171,
                        "menuName": "修改目录",
                        "contextMenuId": 147,
                        "parentId": 147,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 168,
                        "menuName": "查询",
                        "contextMenuId": 147,
                        "parentId": 147,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 169,
                        "menuName": "新建",
                        "contextMenuId": 147,
                        "parentId": 147,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 202,
                        "menuName": "更新",
                        "contextMenuId": null,
                        "parentId": 147,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 201,
                        "menuName": "删除",
                        "contextMenuId": null,
                        "parentId": 147,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 148,
                "menuName": "意见反馈",
                "contextMenuId": null,
                "parentId": 218,
                "menuType": 2,
                "children": []
            },
            {
                "menuId": 152,
                "menuName": "更新日志",
                "contextMenuId": null,
                "parentId": 218,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 190,
                        "menuName": "查询",
                        "contextMenuId": 152,
                        "parentId": 152,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 191,
                        "menuName": "新建",
                        "contextMenuId": 152,
                        "parentId": 152,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 192,
                        "menuName": "批量删除",
                        "contextMenuId": 152,
                        "parentId": 152,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 198,
                        "menuName": "删除",
                        "contextMenuId": null,
                        "parentId": 152,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 207,
                        "menuName": "更新",
                        "contextMenuId": null,
                        "parentId": 152,
                        "menuType": 3,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuId": 213,
        "menuName": "网络安全",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 214,
                "menuName": "登录锁定",
                "contextMenuId": null,
                "parentId": 213,
                "menuType": 2,
                "children": []
            },
            {
                "menuId": 143,
                "menuName": "登录日志",
                "contextMenuId": null,
                "parentId": 213,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 203,
                        "menuName": "查询",
                        "contextMenuId": null,
                        "parentId": 143,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 215,
                "menuName": "接口加解密",
                "contextMenuId": null,
                "parentId": 213,
                "menuType": 2,
                "children": []
            }
        ]
    },
    {
        "menuId": 50,
        "menuName": "系统设置",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 26,
                "menuName": "菜单管理",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 40,
                        "menuName": "删除",
                        "contextMenuId": 26,
                        "parentId": 26,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 105,
                        "menuName": "添加",
                        "contextMenuId": 26,
                        "parentId": 26,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 106,
                        "menuName": "编辑",
                        "contextMenuId": 26,
                        "parentId": 26,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 109,
                "menuName": "参数配置",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 163,
                        "menuName": "新建",
                        "contextMenuId": 109,
                        "parentId": 109,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 164,
                        "menuName": "编辑",
                        "contextMenuId": 109,
                        "parentId": 109,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 199,
                        "menuName": "查询",
                        "contextMenuId": null,
                        "parentId": 109,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 110,
                "menuName": "数据字典",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 159,
                        "menuName": "新建",
                        "contextMenuId": 110,
                        "parentId": 110,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 160,
                        "menuName": "编辑",
                        "contextMenuId": 110,
                        "parentId": 110,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 161,
                        "menuName": "批量删除",
                        "contextMenuId": 110,
                        "parentId": 110,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 162,
                        "menuName": "刷新缓存",
                        "contextMenuId": 110,
                        "parentId": 110,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 130,
                "menuName": "单号管理",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 157,
                        "menuName": "单号生成",
                        "contextMenuId": 130,
                        "parentId": 130,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 158,
                        "menuName": "生成记录",
                        "contextMenuId": 130,
                        "parentId": 130,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 133,
                "menuName": "缓存管理",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": []
            },
            {
                "menuId": 117,
                "menuName": "Reload",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 156,
                        "menuName": "查看结果",
                        "contextMenuId": 117,
                        "parentId": 117,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 193,
                "menuName": "文件管理",
                "contextMenuId": null,
                "parentId": 50,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 200,
                        "menuName": "查询",
                        "contextMenuId": null,
                        "parentId": 193,
                        "menuType": 3,
                        "children": []
                    }
                ]
            }
        ]
    },
    {
        "menuId": 111,
        "menuName": "监控服务",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 1,
        "children": [
            {
                "menuId": 206,
                "menuName": "心跳监控",
                "contextMenuId": null,
                "parentId": 111,
                "menuType": 2,
                "children": []
            },
            {
                "menuId": 81,
                "menuName": "请求监控",
                "contextMenuId": null,
                "parentId": 111,
                "menuType": 2,
                "children": [
                    {
                        "menuId": 204,
                        "menuName": "查询",
                        "contextMenuId": null,
                        "parentId": 81,
                        "menuType": 3,
                        "children": []
                    },
                    {
                        "menuId": 205,
                        "menuName": "详情",
                        "contextMenuId": null,
                        "parentId": 81,
                        "menuType": 3,
                        "children": []
                    }
                ]
            },
            {
                "menuId": 122,
                "menuName": "数据库监控",
                "contextMenuId": null,
                "parentId": 111,
                "menuType": 2,
                "children": []
            }
        ]
    },
    {
        "menuId": 151,
        "menuName": "代码生成",
        "contextMenuId": null,
        "parentId": 0,
        "menuType": 2,
        "children": []
    }
]
)
const colums = ref([
  {
    title: '角色编号',
    dataIndex: 'roleId',
  },{
    title: '角色名称',
    dataIndex: 'roleName',
  },{
    title: '角色编码',
    dataIndex: 'roleCode',
  },{
    title:'员工列表',
    dataIndex:'userlist',
  },{
    title: '操作',
    dataIndex: 'operate'
  }
]);
const queryFormState = {
  id:'',
  pageNo: 1,
  pageSize: 8,
}
const queryForm = reactive({ ...queryFormState });
const tableLoading = ref(false);
const tableData = ref([]);
const total = ref(0);
async function ajaxQuery() {
  total.value = 1
  tableData.value = [
    {
        "roleId": 1,
        "roleName": "技术总监",
        "roleCode": 'ceo',
        "remark": ""
    },
    {
        "roleId": 34,
        "roleName": "销售总监",
        "roleCode": "cto",
        "remark": ""
    },
    {
        "roleId": 35,
        "roleName": "总经理",
        "roleCode": 'coo',
        "remark": ""
    },
    {
        "roleId": 36,
        "roleName": "董事长",
        "roleCode": 'cto',
        "remark": ""
    },
    {
        "roleId": 37,
        "roleName": "财务",
        "roleCode": null,
        "remark": ""
    }
  ]
}
//----------userlist-------------
const userColums = ref([
  {
    title: '姓名',
    dataIndex: 'actualName',
  },{
    title: '手机号',
    dataIndex: 'phone',
  },{
    title: '登录账号',
    dataIndex: 'loginName'
  },{
    title: '部门',
    dataIndex: 'departmentName'
  },{
    title: '状态',
    dataIndex: 'disabledFlag'
  },{
    title: '操作',
    dataIndex: 'operate'
  }
])
const userTableData = ref([]);
const userTotal = ref(0);
async function ajaxUserQuery() {
  userTotal.value = 1
  userTableData.value = [
    {
        "employeeId": 44,
        "loginName": "zhuoda",
        "actualName": "卓大",
        "phone": "18637925892",
        "departmentId": 1,
        "disabledFlag": false,
        "departmentName": "1024创新实验室",
        "createTime": "2021-08-11 10:04:53",
    },
    {
        "employeeId": 47,
        "loginName": "shanyi",
        "actualName": "善逸",
        "phone": "13123111123",
        "departmentId": 1,
        "disabledFlag": false,
        "departmentName": "1024创新实验室",
        "createTime": "2021-08-16 17:14:55",
    }
  ]
}

//----------operate--------------
function userFind(){
  showList.value = 1
  ajaxUserQuery()
}
function aclFind(){
  showList.value = 2
}
function toEdite(){
  showList.value = 1
}
function editeBack(){
  showList.value = 0
}
function deleteAct(){

}
function roleModal(){
  modalVisible.value = true
}
onMounted(ajaxQuery);
</script>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
  name: 'role'
})
</script>
<style>
    .checked-box{
        padding:0 15px
    }
    .checked-box ul{
        padding:0;
        margin:0
    }
    .checked-box ul li{
        list-style: none;
        padding: 0;
        margin: 10px 0;
    }
    .checked-box ul li .menu {
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        align-items: center;
        line-height: 25px;
        padding:5px 0;
    }
    .checked-box ul li .checked-box-label {
        min-width: 150px;
    }
    .checked-box ul li .point {
        display: flex;
        align-items: center;
    }
    .checked-box ul li .point .point-label {
        flex: 1;
        padding-left: 40px;
        border-left: 1px #f0f0f0 solid;
    }
</style>